
<!DOCTYPE html>
<html>
<head>
	<title>segway discovery</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta name="viewport" content="width=device-width,user-scalable=yes" />
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="<?= $domain['static'] ?>css/common.css">
	<link rel="stylesheet" type="text/css" href="<?= $domain['static'] ?>css/pro_list.css">
	<link rel="stylesheet" type="text/css" href="<?= $domain['static'] ?>css/search.css"></head>
<body>
<?php
// 这里是包含子模板方法
$this->load->view('consumer/templates/header');
?>

	<div class="search_icon"></div>
	<!-- search -->


	<div class="search">


	
		<div class="search_m">
		<div class="tab_search">
		<span class="search_lx "><?php echo lang('site_search_touroute');?></span>
			<span class="search_sj tab_search_cur"><?php echo lang('site_search_merchant');?></span>
			

		</div>
		


			<div class="Country">
				<div class="Countryselect_box"><?php echo lang('site_select_none');?></div>
				<div class="Countrylist select_option">
					<p></p>
					<ul>
						
					</ul>
				</div>
			</div>
			<div class="City">
				<div class="Cityselect_box " data-id="0"><?php echo lang('site_select_none');?></div>
				<div class="Citylist select_option">
					<p></p>
					<ul>
						
					</ul>
				</div>
			</div>
			<div class="search_input">

				<input type="search" class="searchInput"></div>
			<div class="search_btn">
				<input type="submit" class="searchBtn" value="Go!"></div>
				<div class="Price " style="display: none;">Price</div>
				<div class="Duration " style="display: none;">Duration</div>

		</div>
	</div>


	<div class="search_pro">
		<div class="search_pro_m">
			<ul class="merchant_search_pro_list">
				
				


				<?php 
				
				foreach ($content["merchants"]["data"] as $key => $value) { ?>


<div class="merchant_search_pro_li">
	<div class="merchant_search_pro_left">
		<div class="merchant_search_pro_left_title">
		<a href="">
			<?php echo $value["name"];?>
			<div class="starts">
			<?php 
				for ( $i = 0; $i < intval( $value["score_average"]); $i++) {
					echo"<p><img src='{$domain['static']}/images/x1.png'></p>";
				}
			?>
			<?php
				for ( $i = 0; $i <(5- intval($value["score_average"])); $i++) {
					echo"<p><img src='{$domain['static']}/images/x2.png'></p>";
				}
			?>
				
			</div>
			</a>
		</div>
		<div class="merchant_search_pro_leftimg"><a href=""><img src="<?php echo $value["cover"];?>?imageView2/2/w/328" alt=""></a>
			<div class="merchant_search_share"><img src="<?= $domain['static'] ?>/images/share2.png" alt=""></div>
			<div class="merchant_search_love"><img src="<?= $domain['static'] ?>/images/like.png" alt=""></div>
		</div>
		<div class="merchant_search_tel"><?php echo $value["mobile"];?></div>
		<div class="merchant_search_address"><a href="<?php echo $value["direction_url"];?>"><?php echo $value["address"];?></a></div>
	</div>
	<div class="merchant_search_pro_right">

	<?php 
	foreach ($value["touroutes"] as $keys => $values) { ?>

		<li><a href="<?php echo site_url("touroute/detail/{$values["id"]}");?>"><div class="merchant_search_pro_rightimg"><img src="<?php echo $values["cover"];?>?imageView2/2/w/251" alt=""></div><div class="merchant_search_pro_righttitle"><?php echo $values["name"];?></div></a></li>

	<?php } ?>
		
		

	</div>
</div>

				<?php } ?>




		</ul>
<?php
$list = $content["merchants"];
echo "<div class='pages'>";
for ($page = 1; $page <= $list['pages']['count']; $page ++) {
	if ($page == $list['pages']['page']) {
		$class = "pagescur";


	}else{
		$class = "";
	}
	$keyword = $this->input->get_post('keyword');
	$country = $this->input->get_post('country');
	$city = $this->input->get_post('city');
	printf("<span>%s</span>", anchor("/merchant/search/?keyword={$keyword}&country={$country}&city={$city}&page={$page}", $page,["class"=>$class]));
}


	printf("共 %d 条, 第 %d 页 / 共 %d 页, 每页 %d 条", $list['pages']['total'], $list['pages']['page'], $list['pages']['count'], $list['pages']['size']);
		
echo "</div>";
?>
		</div>
	</div>

	<!-- error or success -->
	<!-- error 预订和支付反馈-支付失败-->
	<div class="order_pay order_pay_error">
		<div class="order_pay_title">Booking failed</div>
		<div class="order_pay_con">
			You have not paid successfully, please go to your profile - Bookings, complete the reservation within 15 minutes, otherwise the order will be canceled automatically.
		</div>
		<div class="order_pay_btn">View</div>
	</div>
	<!-- success 预订和支付反馈-支付成功-->
	<div class="order_pay order_pay_success">
		<div class="order_pay_title">Booking success</div>
		<div class="order_pay_con">
			You have completed the order payment!
			<br>
			Produce vouchers to the merchant at the lease point.
			<br>Wish you to enjoy segway tour!</div>
		<div class="order_pay_btn">View</div>
	</div>
	
	<?php
	// 这里是包含子模板方法
	$this->load->view('consumer/templates/footer');
	?>
	<script type="text/javascript" src="<?= $domain['static'] ?>js/Validform_v5.1_min.js"></script>
	<script src="<?= $domain['static'] ?>js/cookie.js"></script> 
	<script type="text/javascript" src="<?= $domain['static'] ?>js/common.js"></script>
	<script type="text/javascript">
		var all = "<?php echo lang('site_select_none');?>"
	</script>
	<script type="text/javascript" src="<?= $domain['static'] ?>js/search.js"></script>
	<script type="text/javascript" src="<?= $domain['static'] ?>js/search_res.js"></script>
</body>
</html>